libxl: fix the bug which will cause heap to break down
authorLi Liang <liangx.z.li@intel.com>
Mon, 30 Jun 2014 00:48:37 +0000 (08:48 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 3 Jul 2014 09:49:51 +0000 (10:49 +0100)
commit35fa07df87bf26ae705fddd85802c47d442cda69
tree258e793a647438c8413968806f299a0015f49d22
parentcbe8115b6b1cc8a3a886de61ac3f690caad720c9
libxl: fix the bug which will cause heap to break down

If the JSON message contains more bytes than QMP_RECEIVE_BUFFER_SIZE,
this bug will break down the heap, that leads to core dump. One more
byte should be allocated to contain the appended null character.

Signed-off-by: Li Liang <liangx.z.li@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_qmp.c